package cn.yuanqiao.archive.storeRoom.domain;

import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.annotation.IdAnnotation;
import cn.yuanqiao.common.exception.ServiceException;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.core.domain.BaseEntity;
import cn.yuanqiao.common.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 盒-格子对象 YQBOX
 * 
 * @author xy
 * @date 2023-06-26
 */
public class Box extends BaseEntity
{
    private static final long serialVersionUID = 1L;


    private final String BIGTABLENAME = "_YQBOX";

    public Box() {
        String tenantCode = SecurityUtils.getTenantCode();
        if(StringUtils.isEmpty(tenantCode)){
            throw new ServiceException("tenantCode is null");
           // this.tableName="YQBOX";
        }else {
            this.tableName = tenantCode.toUpperCase()+BIGTABLENAME;
        }
    }

    /** ID号，主键 */
    @IdAnnotation
    private Long boxId;

    /** 规格表ID */
/*
    @Excel(name = "规格表ID")
*/
    private Long specId;

    /** 所在档案柜格子ID */
/*
    @Excel(name = "所在档案柜格子ID")
*/
    private Long gridId;

    /** 上架类型 */
    @Excel(name = "上架类型")
    private String sjType;

    /** 盒号 */
    @Excel(name = "盒号")
    private Integer hehao;

    /** 案卷id */
/*
    @Excel(name = "案卷id")
*/
    private Long folderId;

    /** 档案分表名 */
/*
    @Excel(name = "档案分表名")
*/
    private String subTableName;

    /** 门类id */
/*
    @Excel(name = "门类id")
*/
    private Long categoryId;

    /** 入库上架状态 */
    @Excel(name = "入库上架状态")
    private Integer putawayStatus;

    /** 上架位置 */
    @Excel(name = "上架位置")
    private String hePosition;

    /** 最近上架时间 */
    @Excel(name = "最近上架时间")
    private String sjTime;

    /** 件号（起）（盒皮） */
    @Excel(name = "件号", readConverterExp = "起=")
    private Integer boxStnum;

    /** 件号（止）（盒皮） */
    @Excel(name = "件号", readConverterExp = "止=")
    private Integer boxEdnum;

    /** 全宗号（盒皮） */
    @Excel(name = "全宗号", readConverterExp = "盒=皮")
    private String boxQzh;

    /** 年度（盒皮） */
    @Excel(name = "保管期限", readConverterExp = "盒=皮")
    private String boxBgqx;

    /** 保管期限（盒皮） */
    private Integer boxLpage;

    private String boxStnd;

    private String boxEdnd;

    /** 创建人 */
/*
    @Excel(name = "创建人")
*/
    private Long creator;

    /** 最后修改人 */
/*
    @Excel(name = "最后修改人")
*/
    private Long lastupdater;

    /** 最后修改时间 */
/*
    @Excel(name = "最后修改时间")
*/
    private Date lastupdateTime;

    private String tableName;

    private String archivalCode;
    /**
     *
     */
    private String type;

    private Integer outBoundStatus;

    private Long storeId;

    List<Map<String,Object>> daList;

    private String keyword;

    private String specName;

    private String specDw;
    private List<Long> boxIds;

    private Integer pageNum;

    private Integer pageSize;
    public Long getFolderId() {
        return folderId;
    }

    public void setFolderId(Long folderId) {
        this.folderId = folderId;
    }

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    public void setBoxId(Long boxId)
    {
        this.boxId = boxId;
    }

    public Long getBoxId() 
    {
        return boxId;
    }
    public void setSpecId(Long specId) 
    {
        this.specId = specId;
    }

    public Long getSpecId() 
    {
        return specId;
    }
    public void setGridId(Long gridId) 
    {
        this.gridId = gridId;
    }

    public Long getGridId() 
    {
        return gridId;
    }
    public void setSjType(String sjType) 
    {
        this.sjType = sjType;
    }

    public String getSjType() 
    {
        return sjType;
    }
    public void setHehao(Integer hehao) 
    {
        this.hehao = hehao;
    }

    public Integer getHehao() 
    {
        return hehao;
    }

    public void setSubTableName(String subTableName) 
    {
        this.subTableName = subTableName;
    }

    public String getSubTableName() 
    {
        return subTableName;
    }
    public void setCategoryId(Long categoryId) 
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId() 
    {
        return categoryId;
    }
    public void setPutawayStatus(Integer putawayStatus) 
    {
        this.putawayStatus = putawayStatus;
    }

    public Integer getPutawayStatus() 
    {
        return putawayStatus;
    }
    public void setHePosition(String hePosition) 
    {
        this.hePosition = hePosition;
    }

    public String getHePosition() 
    {
        return hePosition;
    }
    public void setSjTime(String sjTime) 
    {
        this.sjTime = sjTime;
    }

    public String getSjTime() 
    {
        return sjTime;
    }
    public void setBoxStnum(Integer boxStnum) 
    {
        this.boxStnum = boxStnum;
    }

    public Integer getBoxStnum() 
    {
        return boxStnum;
    }
    public void setBoxEdnum(Integer boxEdnum) 
    {
        this.boxEdnum = boxEdnum;
    }

    public Integer getBoxEdnum() 
    {
        return boxEdnum;
    }
    public void setBoxQzh(String boxQzh) 
    {
        this.boxQzh = boxQzh;
    }

    public String getBoxQzh() 
    {
        return boxQzh;
    }
    public void setBoxBgqx(String boxBgqx) 
    {
        this.boxBgqx = boxBgqx;
    }

    public String getBoxBgqx() 
    {
        return boxBgqx;
    }
    public void setBoxLpage(Integer boxLpage) 
    {
        this.boxLpage = boxLpage;
    }

    public Integer getBoxLpage() 
    {
        return boxLpage;
    }
    public void setCreator(Long creator)
    {
        this.creator = creator;
    }

    public Long getCreator()
    {
        return creator;
    }
    public void setLastupdater(Long lastupdater)
    {
        this.lastupdater = lastupdater;
    }

    public Long getLastupdater()
    {
        return lastupdater;
    }
    public void setLastupdateTime(Date lastupdateTime)
    {
        this.lastupdateTime = lastupdateTime;
    }

    public Date getLastupdateTime()
    {
        return lastupdateTime;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getArchivalCode() {
        return archivalCode;
    }

    public void setArchivalCode(String archivalCode) {
        this.archivalCode = archivalCode;
    }

    public Integer getOutBoundStatus() {
        return outBoundStatus;
    }

    public void setOutBoundStatus(Integer outBoundStatus) {
        this.outBoundStatus = outBoundStatus;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Long getStoreId() {
        return storeId;
    }

    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }

    public List<Map<String, Object>> getDaList() {
        return daList;
    }

    public void setDaList(List<Map<String, Object>> daList) {
        this.daList = daList;
    }

    public String getBoxStnd() {
        return boxStnd;
    }

    public void setBoxStnd(String boxStnd) {
        this.boxStnd = boxStnd;
    }

    public String getBoxEdnd() {
        return boxEdnd;
    }

    public void setBoxEdnd(String boxEdnd) {
        this.boxEdnd = boxEdnd;
    }



    public String getSpecName() {
        return specName;
    }

    public void setSpecName(String specName) {
        this.specName = specName;
    }

    public String getSpecDw() {
        return specDw;
    }

    public void setSpecDw(String specDw) {
        this.specDw = specDw;
    }

    public List<Long> getBoxIds() {
        return boxIds;
    }

    public void setBoxIds(List<Long> boxIds) {
        this.boxIds = boxIds;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("boxId", getBoxId())
            .append("specId", getSpecId())
            .append("gridId", getGridId())
            .append("sjType", getSjType())
            .append("hehao", getHehao())
            .append("folderId", getFolderId())
            .append("subTableName", getSubTableName())
            .append("categoryId", getCategoryId())
            .append("putawayStatus", getPutawayStatus())
            .append("hePosition", getHePosition())
            .append("sjTime", getSjTime())
            .append("boxStnum", getBoxStnum())
            .append("boxEdnum", getBoxEdnum())
            .append("boxQzh", getBoxQzh())
            .append("boxBgqx", getBoxBgqx())
            .append("boxLpage", getBoxLpage())
            .append("creator", getCreator())
            .append("createTime", getCreateTime())
            .append("lastupdater", getLastupdater())
            .append("lastupdateTime", getLastupdateTime())
            .append("tableName", getTableName())
            .append("archivalCode", getArchivalCode())
            .append("type", getType())
            .append("outBoundStatus", getOutBoundStatus())
            .append("storeId", getStoreId())
            .append("boxStnd", getBoxStnd())
            .append("boxEdnd", getBoxEdnd())
            .toString();
    }
}
